package sky.cin.framework.network.dto;

import sky.cin.framework.network.http.Request;

public class HttpServletRequest extends Request {

    public HttpServletRequest(String url) {
        super(url);
    }

    public HttpServletRequest(Request request) {
        super(request);
    }
    
    public String getRequestURL() {
        return "http://" + getHeader("host") + getPath();
    }

    public void setHost(String host, Integer port) {
        setHeader("Host", String.format("%s:%d", host, port));
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
